package IO流.综合练习.随机点名;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class 第一题 {
    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new FileReader("F\\name.txt"));
        //读取文件的每一行数据
        int count=0;
        String b;
        while ((b= br.readLine())!=null){
            count++;
            System.out.println("第"+count+"次运行程序:"+b.split("-")[0]);
        }
        //释放资源
        br.close();
    }
}
